﻿using AiQiuQuan.Sport.Model.Enums;

namespace AiQiuQuan.Sport.Model.Models
{
    /// <summary>
    /// 支付单内部转换模型
    /// </summary>
    public class PayOrderInnerInfo
    {
        /// <summary>
        /// 商户订单号
        /// </summary>
        public string OrderNo { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 商品描述
        /// </summary>
        public string ProductDescription { get; set; }

        /// <summary>
        /// 订单金额
        /// </summary>
        public decimal OrderAmount { get; set; }

        /// <summary>
        /// 支付金额
        /// </summary>
        public decimal PayAmount { get; set; }

        /// <summary>
        /// 优惠金额
        /// </summary>
        public decimal DiscountAmount { get; set; }

        /// <summary>
        /// 额外json数据
        /// </summary>
        public string? ExtJson { get; set; }

        /// <summary>
        /// 终端类型：1 小程序、2 H5、3 APP
        /// </summary>
        public ClientTypeEnum ClientType { get; set; } = ClientTypeEnum.MiniProgram;

        /// <summary>
        /// 支付订单状态:1未支付、2已支付、3支付失败、5部分退款、6全部退款、10已过期、15已取消
        /// </summary>
        public PayOrderStateEnum PayState { get; set; } = PayOrderStateEnum.NotPay;

        /// <summary>
        /// 提交支付的id;微信支付（对应openid）
        /// </summary>
        public string Payer { get; set; }

        /// <summary>
        /// 支付备注
        /// </summary>
        public string? PayRemark { get; set; }

        /// <summary>
        /// 支付时间
        /// </summary>
        public DateTimeOffset? PayTime { get; set; }

        /// <summary>
        /// 是否兼容原有场馆订单(一般场馆订单为true)
        /// </summary>
        public bool IsCompatibleVenueOrder { get; set; }

        /// <summary>
        /// 用户id
        /// </summary>
        public Guid UserId { get; set; }

        /// <summary>
        /// 第三方支付时的回调URL
        /// </summary>
        public string NotifyUrl { get; set; }

        /// <summary>
        /// 第三方预支付ID
        /// </summary>
        public string PrePayId { get; set; } = string.Empty;
    }
}